home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / NetSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  16.3 KB  |  570 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.0.2
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __NETSPROCKET__
  19. #define __NETSPROCKET__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24.  
  25. #if TARGET_OS_MAC
  26. #ifndef __MACTYPES__
  27. #include <MacTypes.h>
  28. #endif
  29. #ifndef __EVENTS__
  30. #include <Events.h>
  31. #endif
  32.  
  33. #include <OpenTransport.h>
  34. #include <OpenTptInternet.h>
  35.  
  36. #endif  /* TARGET_OS_MAC */
  37.  
  38.  
  39.  
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. #if PRAGMA_IMPORT
  49. #pragma import on
  50. #endif
  51.  
  52. #if PRAGMA_STRUCT_ALIGN
  53.     #pragma options align=power
  54. #elif PRAGMA_STRUCT_PACKPUSH
  55.     #pragma pack(push, 2)
  56. #elif PRAGMA_STRUCT_PACK
  57.     #pragma pack(2)
  58. #endif
  59.  
  60. #if TARGET_OS_MAC
  61.  
  62. enum {
  63.     kNSpMaxPlayerNameLen        = 31,
  64.     kNSpMaxGroupNameLen            = 31,
  65.     kNSpMaxPasswordLen            = 31,
  66.     kNSpMaxGameNameLen            = 31,
  67.     kNSpMaxDefinitionStringLen    = 255
  68. };
  69.  
  70.  
  71. /* NetSprocket basic types */
  72. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  73. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  74. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  75. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  76. typedef SInt32                             NSpEventCode;
  77. typedef SInt32                             NSpGameID;
  78. typedef SInt32                             NSpPlayerID;
  79. typedef NSpPlayerID                     NSpGroupID;
  80. typedef UInt32                             NSpPlayerType;
  81. typedef SInt32                             NSpFlags;
  82. typedef Str31                             NSpPlayerName;
  83. /* Individual player info */
  84.  
  85.     struct NSpPlayerInfo {
  86.         NSpPlayerID                     id;
  87.         NSpPlayerType                     type;
  88.         Str31                             name;
  89.         UInt32                             groupCount;
  90.         NSpGroupID                         groups[1];
  91.     };
  92.     typedef struct NSpPlayerInfo NSpPlayerInfo;
  93.     
  94. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  95. /* list of all players */
  96.  
  97. struct NSpPlayerEnumeration {
  98.     UInt32                             count;
  99.     NSpPlayerInfoPtr                 playerInfo[1];
  100. };
  101. typedef struct NSpPlayerEnumeration        NSpPlayerEnumeration;
  102. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  103. /* Individual group info */
  104.  
  105. struct NSpGroupInfo {
  106.     NSpGroupID                         id;
  107.     UInt32                             playerCount;
  108.     NSpPlayerID                     players[1];
  109. };
  110. typedef struct NSpGroupInfo                NSpGroupInfo;
  111. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  112. /* List of all groups */
  113.  
  114. struct NSpGroupEnumeration {
  115.     UInt32                             count;
  116.     NSpGroupInfoPtr                 groups[1];
  117. };
  118. typedef struct NSpGroupEnumeration        NSpGroupEnumeration;
  119. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  120. /* Topology types */
  121.  
  122. typedef UInt32                             NSpTopology;
  123.  
  124. enum {
  125.     kNSpClientServer            = 0x00000001
  126. };
  127.  
  128. /* Game information */
  129.  
  130. struct NSpGameInfo {
  131.     UInt32                             maxPlayers;
  132.     UInt32                             currentPlayers;
  133.     UInt32                             currentGroups;
  134.     NSpTopology                     topology;
  135.     UInt32                             reserved;
  136.     Str31                             name;
  137.     Str31                             password;
  138. };
  139. typedef struct NSpGameInfo                NSpGameInfo;
  140. /* Structure used for sending and receiving network messages */
  141.  
  142.     struct NSpMessageHeader {
  143.         UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  144.         SInt32                             what;                        /* The kind of message (e.g. player joined) */
  145.         NSpPlayerID                     from;                        /* ID of the sender */
  146.         NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  147.         UInt32                             id;                            /* Unique ID for this message & (from) player */
  148.         UInt32                             when;                        /* Timestamp for the message */
  149.         UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  150.     };
  151.     typedef struct NSpMessageHeader NSpMessageHeader;
  152.     
  153. /* NetSprocket-defined message structures */
  154.  
  155. struct NSpErrorMessage {
  156.     NSpMessageHeader                 header;
  157.     OSStatus                         error;
  158. };
  159. typedef struct NSpErrorMessage            NSpErrorMessage;
  160.  
  161. struct NSpJoinRequestMessage {
  162.     NSpMessageHeader                 header;
  163.     Str31                             name;
  164.     Str31                             password;
  165.     UInt32                             theType;
  166.     UInt32                             customDataLen;
  167.     UInt8                             customData[1];
  168. };
  169. typedef struct NSpJoinRequestMessage    NSpJoinRequestMessage;
  170.  
  171. struct NSpJoinApprovedMessage {
  172.     NSpMessageHeader                 header;
  173. };
  174. typedef struct NSpJoinApprovedMessage    NSpJoinApprovedMessage;
  175.  
  176. struct NSpJoinDeniedMessage {
  177.     NSpMessageHeader                 header;
  178.     Str255                             reason;
  179. };
  180. typedef struct NSpJoinDeniedMessage        NSpJoinDeniedMessage;
  181.  
  182. struct NSpPlayerJoinedMessage {
  183.     NSpMessageHeader                 header;
  184.     UInt32                             playerCount;
  185.     NSpPlayerInfo                     playerInfo;
  186. };
  187. typedef struct NSpPlayerJoinedMessage    NSpPlayerJoinedMessage;
  188.  
  189. struct NSpPlayerLeftMessage {
  190.     NSpMessageHeader                 header;
  191.     UInt32                             playerCount;
  192.     NSpPlayerID                     playerID;
  193.     NSpPlayerName                     playerName;
  194. };
  195. typedef struct NSpPlayerLeftMessage        NSpPlayerLeftMessage;
  196.  
  197. struct NSpHostChangedMessage {
  198.     NSpMessageHeader                 header;
  199.     NSpPlayerID                     newHost;
  200. };
  201. typedef struct NSpHostChangedMessage    NSpHostChangedMessage;
  202.  
  203. struct NSpGameTerminatedMessage {
  204.     NSpMessageHeader                 header;
  205. };
  206. typedef struct NSpGameTerminatedMessage    NSpGameTerminatedMessage;
  207. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  208.  
  209. enum {
  210.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  211.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  212.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  213. };
  214.  
  215.  
  216. /* Options for message delivery.  These can be bitwise ORed together with each other,
  217.         as well as with ONE of the above */
  218.  
  219. enum {
  220.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  221.     kNSpSendFlag_SelfSend        = 0x00000002,
  222.     kNSpSendFlag_Blocking        = 0x00000004
  223. };
  224.  
  225.  
  226. /* Options for Hosting Joining, and Deleting games */
  227.  
  228. enum {
  229.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  230.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  231. };
  232.  
  233. /* Message "what" types */
  234. /* Apple reserves all negative "what" values (anything with bit 32 set) */
  235.  
  236. enum {
  237.     kNSpSystemMessagePrefix        = (long)0x80000000,
  238.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  239.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  240.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  241.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  242.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  243.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  244.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  245.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007
  246. };
  247.  
  248.  
  249. /* Special TPlayerIDs  for sending messages */
  250.  
  251. enum {
  252.     kNSpAllPlayers                = 0x00000000,
  253.     kNSpHostOnly                = (long)0xFFFFFFFF
  254. };
  255.  
  256.  
  257. /* NetSprocket Error Codes */
  258.  
  259. enum {
  260.     kNSpInitializationFailedErr    = -30360,
  261.     kNSpAlreadyInitializedErr    = -30361,
  262.     kNSpTopologyNotSupportedErr    = -30362,
  263.     kNSpPipeFullErr                = -30364,
  264.     kNSpHostFailedErr            = -30365,
  265.     kNSpProtocolNotAvailableErr    = -30366,
  266.     kNSpInvalidGameRefErr        = -30367,
  267.     kNSpInvalidParameterErr        = -30369,
  268.     kNSpOTNotPresentErr            = -30370,
  269.     kNSpOTVersionTooOldErr        = -30371,
  270.     kNSpMemAllocationErr        = -30373,
  271.     kNSpAlreadyAdvertisingErr    = -30374,
  272.     kNSpNotAdvertisingErr        = -30376,
  273.     kNSpInvalidAddressErr        = -30377,
  274.     kNSpFreeQExhaustedErr        = -30378,
  275.     kNSpRemovePlayerFailedErr    = -30379,
  276.     kNSpAddressInUseErr            = -30380,
  277.     kNSpFeatureNotImplementedErr = -30381,
  278.     kNSpNameRequiredErr            = -30382,
  279.     kNSpInvalidPlayerIDErr        = -30383,
  280.     kNSpInvalidGroupIDErr        = -30384,
  281.     kNSpNoPlayersErr            = -30385,
  282.     kNSpNoGroupsErr                = -30386,
  283.     kNSpNoHostVolunteersErr        = -30387,
  284.     kNSpCreateGroupFailedErr    = -30388,
  285.     kNSpAddPlayerFailedErr        = -30389,
  286.     kNSpInvalidDefinitionErr    = -30390,
  287.     kNSpInvalidProtocolRefErr    = -30391,
  288.     kNSpInvalidProtocolListErr    = -30392,
  289.     kNSpTimeoutErr                = -30393,
  290.     kNSpGameTerminatedErr        = -30394,
  291.     kNSpConnectFailedErr        = -30395,
  292.     kNSpSendFailedErr            = -30396,
  293.     kNSpJoinFailedErr            = -30399
  294. };
  295.  
  296.  
  297.  
  298.  
  299. /************************  Initialization  ************************/
  300. EXTERN_API_C( OSStatus )
  301. NSpInitialize                    (UInt32                 inStandardMessageSize,
  302.                                  UInt32                 inBufferSize,
  303.                                  UInt32                 inQElements,
  304.                                  NSpGameID                 inGameID,
  305.                                  UInt32                 inTimeout);
  306.  
  307.  
  308.  
  309.  
  310. /**************************  Protocols  **************************/
  311. /* Programmatic protocol routines */
  312. EXTERN_API_C( OSStatus )
  313. NSpProtocol_New                    (const char *            inDefinitionString,
  314.                                  NSpProtocolReference *    outReference);
  315.  
  316. EXTERN_API_C( void )
  317. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  318.  
  319. EXTERN_API_C( OSStatus )
  320. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  321.                                  char *                    outDefinitionString);
  322.  
  323.  
  324. /* Protocol list routines */
  325. EXTERN_API_C( OSStatus )
  326. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  327.                                  NSpProtocolListReference * outList);
  328.  
  329. EXTERN_API_C( void )
  330. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  331.  
  332. EXTERN_API_C( OSStatus )
  333. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  334.                                  NSpProtocolReference     inProtocolRef);
  335.  
  336. EXTERN_API_C( OSStatus )
  337. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  338.                                  NSpProtocolReference     inProtocolRef);
  339.  
  340. EXTERN_API_C( OSStatus )
  341. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  342.                                  UInt32                 inIndex);
  343.  
  344. EXTERN_API_C( UInt32 )
  345. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  346.  
  347. EXTERN_API_C( NSpProtocolReference )
  348. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  349.                                  UInt32                 inIndex);
  350.  
  351.  
  352. /* Helpers */
  353. EXTERN_API_C( NSpProtocolReference )
  354. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  355.                                  ConstStr31Param         inNBPType,
  356.                                  UInt32                 inMaxRTT,
  357.                                  UInt32                 inMinThruput);
  358.  
  359. EXTERN_API_C( NSpProtocolReference )
  360. NSpProtocol_CreateIP            (InetPort                 inPort,
  361.                                  UInt32                 inMaxRTT,
  362.                                  UInt32                 inMinThruput);
  363.  
  364.  
  365. /***********************  Human Interface  ************************/
  366. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  367. EXTERN_API_C( NSpAddressReference )
  368. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  369.                                  ConstStr255Param         inEntityListLabel,
  370.                                  Str31                     ioName,
  371.                                  Str31                     ioPassword,
  372.                                  NSpEventProcPtr         inEventProcPtr);
  373.  
  374. EXTERN_API_C( Boolean )
  375. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  376.                                  Str31                     ioGameName,
  377.                                  Str31                     ioPlayerName,
  378.                                  Str31                     ioPassword,
  379.                                  NSpEventProcPtr         inEventProcPtr);
  380.  
  381.  
  382. /*********************  Hosting and Joining  **********************/
  383. EXTERN_API_C( OSStatus )
  384. NSpGame_Host                    (NSpGameReference *        outGame,
  385.                                  NSpProtocolListReference  inProtocolList,
  386.                                  UInt32                 inMaxPlayers,
  387.                                  ConstStr31Param         inGameName,
  388.                                  ConstStr31Param         inPassword,
  389.                                  ConstStr31Param         inPlayerName,
  390.                                  NSpPlayerType             inPlayerType,
  391.                                  NSpTopology             inTopology,
  392.                                  NSpFlags                 inFlags);
  393.  
  394. EXTERN_API_C( OSStatus )
  395. NSpGame_Join                    (NSpGameReference *        outGame,
  396.                                  NSpAddressReference     inAddress,
  397.                                  ConstStr31Param         inName,
  398.                                  ConstStr31Param         inPassword,
  399.                                  NSpPlayerType             inType,
  400.                                  void *                    inCustomData,
  401.                                  UInt32                 inCustomDataLen,
  402.                                  NSpFlags                 inFlags);
  403.  
  404. EXTERN_API_C( OSStatus )
  405. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  406.                                  NSpProtocolReference     inProtocol,
  407.                                  Boolean                 inEnable);
  408.  
  409. EXTERN_API_C( OSStatus )
  410. NSpGame_Dispose                    (NSpGameReference         inGame,
  411.                                  NSpFlags                 inFlags);
  412.  
  413. EXTERN_API_C( OSStatus )
  414. NSpGame_GetInfo                    (NSpGameReference         inGame,
  415.                                  NSpGameInfo *            ioInfo);
  416.  
  417. /**************************  Messaging  **************************/
  418. EXTERN_API_C( OSStatus )
  419. NSpMessage_Send                    (NSpGameReference         inGame,
  420.                                  NSpMessageHeader *        inMessage,
  421.                                  NSpFlags                 inFlags);
  422.  
  423. EXTERN_API_C( NSpMessageHeader *)
  424. NSpMessage_Get                    (NSpGameReference         inGame);
  425.  
  426. EXTERN_API_C( void )
  427. NSpMessage_Release                (NSpGameReference         inGame,
  428.                                  NSpMessageHeader *        inMessage);
  429.  
  430. /* Helpers */
  431. EXTERN_API_C( OSStatus )
  432. NSpMessage_SendTo                (NSpGameReference         inGame,
  433.                                  NSpPlayerID             inTo,
  434.                                  SInt32                 inWhat,
  435.                                  void *                    inData,
  436.                                  UInt32                 inDataLen,
  437.                                  NSpFlags                 inFlags);
  438.  
  439.  
  440. /*********************  Player Information  **********************/
  441. EXTERN_API_C( NSpPlayerID )
  442. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  443.  
  444. EXTERN_API_C( OSStatus )
  445. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  446.                                  NSpPlayerID             inPlayerID,
  447.                                  NSpPlayerInfoPtr *        outInfo);
  448.  
  449. EXTERN_API_C( void )
  450. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  451.                                  NSpPlayerInfoPtr         inInfo);
  452.  
  453. EXTERN_API_C( OSStatus )
  454. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  455.                                  NSpPlayerEnumerationPtr * outPlayers);
  456.  
  457. EXTERN_API_C( void )
  458. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  459.                                  NSpPlayerEnumerationPtr  inPlayers);
  460.  
  461. EXTERN_API_C( UInt32 )
  462. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  463.                                  NSpPlayerID             inPlayer);
  464.  
  465. EXTERN_API_C( UInt32 )
  466. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  467.                                  NSpPlayerID             inPlayer);
  468.  
  469.  
  470. /*********************  Group Management  **********************/
  471. EXTERN_API_C( OSStatus )
  472. NSpGroup_New                    (NSpGameReference         inGame,
  473.                                  NSpGroupID *            outGroupID);
  474.  
  475. EXTERN_API_C( OSStatus )
  476. NSpGroup_Dispose                (NSpGameReference         inGame,
  477.                                  NSpGroupID             inGroupID);
  478.  
  479. EXTERN_API_C( OSStatus )
  480. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  481.                                  NSpGroupID             inGroupID,
  482.                                  NSpPlayerID             inPlayerID);
  483.  
  484. EXTERN_API_C( OSStatus )
  485. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  486.                                  NSpGroupID             inGroupID,
  487.                                  NSpPlayerID             inPlayerID);
  488.  
  489. EXTERN_API_C( OSStatus )
  490. NSpGroup_GetInfo                (NSpGameReference         inGame,
  491.                                  NSpGroupID             inGroupID,
  492.                                  NSpGroupInfoPtr *        outInfo);
  493.  
  494. EXTERN_API_C( void )
  495. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  496.                                  NSpGroupInfoPtr         inInfo);
  497.  
  498. EXTERN_API_C( OSStatus )
  499. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  500.                                  NSpGroupEnumerationPtr * outGroups);
  501.  
  502. EXTERN_API_C( void )
  503. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  504.                                  NSpGroupEnumerationPtr  inGroups);
  505.  
  506.  
  507. /**************************  Utilities  ***************************/
  508. EXTERN_API_C( NumVersion )
  509. NSpGetVersion                    (void);
  510.  
  511. EXTERN_API_C( void )
  512. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  513.  
  514. EXTERN_API_C( UInt32 )
  515. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  516.  
  517. EXTERN_API_C( NSpAddressReference )
  518. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  519.  
  520. EXTERN_API_C( OTAddress *)
  521. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  522.  
  523. EXTERN_API_C( void )
  524. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  525.  
  526.  
  527. /************************ Advanced/Async routines ****************/
  528. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  529. EXTERN_API_C( OSStatus )
  530. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  531.                                  void *                    inContext);
  532.  
  533.  
  534. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  535. EXTERN_API_C( OSStatus )
  536. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  537.                                  void *                    inContext);
  538.  
  539.  
  540. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  541. EXTERN_API_C( OSStatus )
  542. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  543.                                  void *                    inContext);
  544.  
  545.  
  546.  
  547. #endif  /* TARGET_OS_MAC */
  548.  
  549.  
  550. #if PRAGMA_STRUCT_ALIGN
  551.     #pragma options align=reset
  552. #elif PRAGMA_STRUCT_PACKPUSH
  553.     #pragma pack(pop)
  554. #elif PRAGMA_STRUCT_PACK
  555.     #pragma pack()
  556. #endif
  557.  
  558. #ifdef PRAGMA_IMPORT_OFF
  559. #pragma import off
  560. #elif PRAGMA_IMPORT
  561. #pragma import reset
  562. #endif
  563.  
  564. #ifdef __cplusplus
  565. }
  566. #endif
  567.  
  568. #endif /* __NETSPROCKET__ */
  569.  
  570.